package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mapper.UserMapper;
import com.example.pojo.User;
import com.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> selectAllUser(String realName,int start, int pageSize) {
        return userMapper.selectAllUser(realName,start, pageSize);
    }

    @Override
    public int selectUserCount(String realName) {
        return userMapper.selectUserCount(realName);
    }

    @Override
    public int updateUser1(User user) {
        return userMapper.updateUser1(user);
    }

    @Override
    public int updateUser2(User user) {
        return userMapper.updateUser2(user);
    }


    @Override
    public User selectUserById(int id) {
        return userMapper.selectById(id);
    }
}
